//
//  ALPS_TRadioTopCCCell.m
//  Alps
//
//  Created by dllo on 16/6/7.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ALPS_TRadioTopCCCell.h"

@implementation ALPS_TRadioTopCCCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.pView = [[UIImageView alloc] init];
        self.pView.userInteractionEnabled = YES;
        UITapGestureRecognizer *tag = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didClickederTagView:)];
        [self.pView addGestureRecognizer:tag];
        [self.contentView addSubview:_pView];
        
        self.nameLabel = [[UILabel alloc] init];
        self.nameLabel.textColor = [UIColor grayColor];
        self.nameLabel.font = [UIFont systemFontOfSize:14];
        self.nameLabel.textAlignment = 1;
        [self.contentView addSubview:_nameLabel];


        
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    [self.pView makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).offset(10);
        make.left.equalTo(self.contentView).offset(20);
        make.right.equalTo(self.contentView).offset(-20);
        make.height.equalTo(50);
        
    }];
    
    [self.nameLabel makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.pView.bottom).offset(5);
        make.left.equalTo(self.contentView).offset(20);
        make.right.equalTo(self.contentView).offset(-20);
        make.height.equalTo(20);
    }];
}

-(void)didClickederTagView:(UITapGestureRecognizer *)sender
{
    self.radioValue(self.number);
    
}



@end
